#include<stdio.h>
int main()
{
	int a,ge,shi,bai,qian;
	double y;
	scanf("%d",&a);
	ge=a%10;
	shi=(a%100)/10;
	bai=(a/100)%10;
	qian=a/1000;
	y=((double)bai*qian)/(ge+shi);
	printf("%.3lf\n",y);
}
